﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Praxis.Entities;

namespace Praxis.Repository
{
    public class DetalleAlquilerDAO:MasterRepository, IDetalleAlquilerDAO
    {
        public List<DETALLE_ALQUILER> GetAllDetalleAlquilerByCriterio(Int32 criterio)
        {
                var query = from c in Context.DETALLE_ALQUILER
                            where c.ALQUILER.Codigo.Equals(criterio)
                            select c;
                return query.ToList();
         }


        public List<DETALLE_ALQUILER> GetAllFromDetalleAlquilerByAlquilerById(int id)
        {
            var query = from c in Context.DETALLE_ALQUILER.Include("EQUIPO")
                        where c.CodigoAlquiler.Equals(id)
                        select c;

            return query.ToList();
        }
    }
}
